package xjtu.se.articlecommunity.user.publisharticle.dao;


import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import xjtu.se.articlecommunity.user.publisharticle.dto.ATagDto;

public interface ATagDao {
//    @Select("select max(convert(at_tab,signed)) from t_article_tab")
//    Integer findMaxID(ATagDto aTagDto);
//
//    @Select("select at_name from t_article_tab where convert(at_tab,signed) = #{at_tab}")
//    String findATNamebyATID(ATagDto aTagDto);

    @Insert("insert into art_tab values(#{a_id},#{at_tab})")
    void InsertArtTab(String a_id,String at_tab);
    @Delete("delete  from art_tab where a_id=#{a_id}")
    void deleteTabsByA_id(String a_id);
    @Select("select count(*) from art_tab where a_id=#{a_id}")
    int getTabsNumByA_id(String a_id);
    @Select("select count(*) from art_tab where a_id=#{a_id} and at_tab=#{tab}")
    int ifExist(String a_id, String tab);
}
